package com.vsen.lpr.mapper;

import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.vsen.lpr.entity.Balance;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * <p>
 * Mapper 接口
 * </p>
 *
 * @author yy
 * @since 2021-08-04
 */
@Mapper
public interface BalanceMapper extends BaseMapper<Balance> {

    Balance selectByUserId(@Param("userId") String userId);


    Integer reduceBalance(@Param("userId") String userId, @Param("total") Long total);


    Integer addBalance(@Param("userId") String userId,@Param("amount") Long amount);
}
